package cn.stylefeng.guns.modular.ctm.mapper;

import cn.stylefeng.guns.modular.ctm.dto.CtmDTO;
import cn.stylefeng.guns.modular.ctm.entity.Ctm;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 城市信息 Mapper 接口
 * </p>
 *
 * @author yzb
 * @Mapper
 * @since 2022-05-24
 */
@Mapper
public interface CtmMapper extends BaseMapper<Ctm> {

    IPage<CtmDTO> selectByPage(Page page, @Param("param") Ctm ctm);

    void collectionPost(@Param("inputJobId")String inputJobId, @Param("onlineUserId")String userId);

    void uncollectPost(@Param("inputJobId")String inputJobId, @Param("onlineUserId")String userId);

    IPage<CtmDTO> collectionPostPage(Page page, @Param("param") Ctm ctm);

    void cancelNotInterested(@Param("inputJobId")String inputJobId, @Param("onlineUserId")String userId);

    void notInterested(@Param("inputJobId")String inputJobId, @Param("onlineUserId")String userId);

    int countCollectPost(@Param("inputJobId")String inputJobId, @Param("onlineUserId")String userId);

    int countNotInterested(@Param("inputJobId")String inputJobId, @Param("onlineUserId")String userId);

    IPage<CtmDTO> notInterestedPage(Page page, @Param("param") Ctm ctm);

    CtmDTO selectInfoById(@Param("inputJobId") String inputJobId, @Param("onlineUserId")String userId);

    List<Map<String, Object>> hotJob();
}
